package com.itheima.consumer.listener;

import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class SpringLitenerMQ {

    @RabbitListener(queues = "simple.queue")
    public void listener2Queue(String msg) {
        log.info("接受了消息:{}", msg);
    }
}
